namespace ScrumSprintMonitor.Infrastructure
{
	#region #using Directives

	using System;
	using System.ComponentModel;

	#endregion

	public interface ITeamMemberInformation : INotifyPropertyChanged
	{
		/// <summary>
		/// The name by which the work item repository knows the team member.
		/// </summary>
		string Name { get; }

		/// <summary>
		/// True if the info is for team member that represents the unassigned work for this team.
		/// </summary>
		bool Unassigned { get; }

		/// <summary>
		/// The display name.
		/// </summary>
		string DisplayAlias { get; }

		/// <summary>
		/// The avatar that represents this team member.
		/// </summary>
		IAvatar Avatar { get; set; }

		/// <summary>
		/// The name of the team the member belongs to.
		/// </summary>
		string Team { get; }

		/// <summary>
		/// The name by which a scheduler application (such as Microsoft Outlook) knows the team member.
		/// </summary>
		string SchedulerAlias { get; }

		/// <summary>
		/// The domain name of the team member (e.g. company\username).
		/// </summary>
		string DomainName { get; }

		/// <summary>
		/// The team member's time zone.
		/// </summary>
		TimeZoneInfo TimeZone { get; }

		double HourlyProductivityFactor { get; }

		bool DedicatedToSprint { get; }

		/// <summary>
		/// Gets the start DateTime of the day in date.
		/// </summary>
		/// <param name="date">A date expressed in the the team member's timezone.</param>
		/// <returns>A date expressed in the the team member's timezone that points to the start of that workday.</returns>
		DateTime GetWorkdayStart(DateTime date);

		/// <summary>
		/// Gets the end DateTime of the day in date.
		/// </summary>
		/// <param name="date">A date expressed in the the team member's timezone.</param>
		/// <returns>A date expressed in the the team member's timezone that points to the end of that workday.</returns>
		DateTime GetWorkdayEnd(DateTime date);

		/// <summary>
		/// Determines whether the team member is busy in a specific time slot.
		/// </summary>
		/// <param name="time">A timestamp expressed in the the team member's timezone.</param>
		/// <param name="slotSize">The size of the slot to check.</param>
		/// <returns>Whether the team member is busy.</returns>
		bool IsBusy(DateTime time, TimeSpan slotSize);
	}
}